export const formItems = [
  {
    filed: 'ctId',
    type: 'select',
    labelCode: 'name',
    valueCode: 'id',
    label: '餐厅',
    options: []
  },
  {
    filed: 'goodName',
    type: 'input',
    label: '餐品名称'
  },
  {
    filed: 'time',
    type: 'daterange',
    clearable: false,
    label: '日期',
    pickerOptions: {
      shortcuts: [{
        text: '近7天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 6)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近30天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 29)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近60天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 59)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近90天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 89)
          picker.$emit('pick', [start, end])
        }
      }],
      disabledDate(time) {
        var curDate = new Date(new Date().toLocaleDateString()).getTime()
        var preDate = new Date(curDate + 24 * 60 * 60 * 1000 - 1)
        return time.getTime() > preDate
      }
    }
  },
  {
    filed: 'payMethod',
    type: 'select',
    label: '支付方式',
    labelCode: 'name',
    options: []
  },
  {
    filed: 'memberInfo',
    type: 'input',
    label: '会员信息',
    placeholder: '请输入会员姓名/手机号/卡号'
  },
  {
    filed: 'channelType',
    type: 'select',
    label: '订单来源',
    options: [
      { value: '01', label: '小程序' },
      { value: '02', label: '场馆pc端' }]
  },
  {
    filed: 'orderId',
    type: 'input',
    label: '订单号'
  }
]
export const queryFormConfig = {
  formItems,
  online: true
}
